<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		 <link href="CSS/Accessible_Design.css" rel="stylesheet" type="text/css" />
		<base href="<%=basePath%>">

		<title>修改角色</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	</head>

	<body>
		<html:form action="roleUpdate.do">
			<table width="800" height="117" border="1" cellspacing="0"
				class="small">
				<tr>
					<td height="30">
						<div align="center">
							<strong>修改角色</strong>
						</div>
					</td>
				</tr>

				<tr>
					<td height="30">
						<p>
							<label></label>
							角色编号:

							<html:text property="roleid" value="${role.roleId}" readonly="true"></html:text>
						</p>
					</td>
				</tr>

				<tr>
					<td height="30">
						<p>
							<label></label>
							角色名称:

							<html:text property="rolename" value="${role.roleName}"></html:text>
						</p>
					</td>
				</tr>

				<tr>
					<td height="12">
						<input type="radio" name="rolestatus" value="0" <c:if test="${role.roleaStatus eq 0}">checked</c:if> >
						停用
						<input type="radio" name="rolestatus" value="1" <c:if test="${role.roleaStatus eq 1}">checked</c:if> >
						启用
						<label></label>
					</td>
				</tr>
				<tr>
					<td height="13">
						<html:submit value="修改"></html:submit>
					</td>
				</tr>
			</table>
			<table width="800" height="117" border="1" cellspacing="0"class="small">
				<tr>
					<td height="30" colspan="6">
						<div align="center">
							<strong>权限列表</strong>
						</div>
					</td>
				</tr>

				<tr>
					<c:forEach var="powerList" items="${role.powerList}">
						<td height="30">
							<input type="checkbox" name="power" value="${powerList.powerId}" <c:if test="${powerList.struts eq 1}">checked</c:if> >${powerList.powerName}
							
								<c:forEach var="childPowerList" items="${powerList.childPower}">
									<br>&nbsp; &nbsp;
									<input type="checkbox" name="power" value="${childPowerList.powerId}" <c:if test="${childPowerList.struts eq 1}">checked</c:if> >${childPowerList.powerName}
									
								</c:forEach>
						</td>
					</c:forEach>
				</tr>

			</table>
		</html:form>
	</body>
</html>
